package imse.team0.invoice;

import javax.xml.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;

/**
 * @author Eugen, 5/3/12 6:17 PM
 */

@XmlRootElement(name="invoice", namespace = "")
@XmlAccessorType(XmlAccessType.FIELD)
public class Invoice {
    @XmlAttribute(name = "orderID", required = true)
    private String orderId;
    @XmlAttribute(name="cid", required = true)
    private String cid;
    /*Here we insert the route identifier so that multiple queue consumers
    * represented by the copies of the created routes can filter the messages
    * from the same queue !*/
    @XmlAttribute(name = "extraIDCode", required = true)
    private String invoiceGroup;
    @XmlElementWrapper(name="invoiceItems")
    @XmlElement(name= "item")
    private List<InvoiceItem> invoiceItems = new ArrayList<InvoiceItem>();
    private double shipmentCost;
    private double totalCost;

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public String getInvoiceGroup() {
        return invoiceGroup;
    }

    public void setInvoiceGroup(String invoiceGroup) {
        this.invoiceGroup = invoiceGroup;
    }

    public List<InvoiceItem> getInvoiceItems() {
        return invoiceItems;
    }

    public void setInvoiceItems(List<InvoiceItem> invoiceItems) {
        this.invoiceItems = invoiceItems;
    }

    public double getShipmentCost() {
        return shipmentCost;
    }

    public void setShipmentCost(double shipmentCost) {
        this.shipmentCost = shipmentCost;
    }

    public double getTotalCost() {
        return totalCost;
    }

    public void setTotalCost(double totalCost) {
        this.totalCost = totalCost;
    }
}
